'''
Created on 2011-01-08

@author: Hanna Dutkiewicz
'''


'''
Klasa grupy dokumentow
'''
class Group(object):

    def __init__(self):
        self.documents = []
        self.name = []
        
    def addDocument(self, doc):
        self.documents.append(doc)
        
    def getDocuments(self):
        return self.documents
    
    def addNameWord(self, name):
        self.name.append(name)
        
    def getName(self):
        if len(self.name) == 0:
            return "noname"
        
        toRet = ""
        for w in self.name:
            toRet += w + ", "
        return toRet[0:(len(toRet)-2)]
    
    def getSize(self):
        return len(self.documents)
